import service from '@/utils/request'

export const useSmCourseApi = (id: number) => {
	return service.get('/sm/course/' + id)
}

export const useSmCourseSubmitApi = (dataForm: any) => {
	if (dataForm.id) {
		return service.put('/sm/course', dataForm)
	} else {
		return service.post('/sm/course', dataForm)
	}
}